<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- 用JSON创建对象存储学生信息，包括学号、身份证、年龄、性别、专业等信息，
        同时包含一个方法自我介绍，用来输出对象所有信息。 -->
    <script>
        var students = [{
            name: "黎娜娜",
            age: "18",
            height: 180,
            id: 8,
            sex: "女",
            speciality: "计算机"
        },
        {
            name: "嘉琪",
            age: "19",
            height: 180,
            id: 9,
            sex: "女",
            speciality: "计算机"
        },
        {
            name: "王娇",
            age: 19,
            height: 180,
            id: 9,
            sex: "女",
            speciality: "计算机"
        }
        ]
        // console.log(students[0].name );
        for(var i=0;i<students .length;i++){
            console.log("我是"+students[i].name+"年龄"+students[i].age+"性别"+students[i].sex);
            // console.log(students[i].name );
        }
      
    </script>
</body>

</html>